/*
Copyright (C) 2009 Matthew Perry

This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This libary/program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using BaseTools.XS;
using BaseTools.Configuration;

namespace SourceTools.IO
{
	/// <summary>
	/// The steam settings handler
	/// </summary>
	public class Steam
	{
		/// <summary>
		/// The location of the steam installation
		/// </summary>
		public static string Location
		{
			get
			{
				return XConf.LoadConfig("steam.xbt")["Steam"];
			}
			set
			{
				ConfigList lst = XConf.LoadConfig("steam.xbt");
				lst["Steam"] = value;
				XConf.SaveConfig("steam.xbt", lst);
			}
		}
		
		/// <summary>
		/// The username used on steam
		/// </summary>
		public static string Username
		{
			get
			{
				return XConf.LoadConfig("steam.xbt")["Username"];
			}
			set
			{
				ConfigList lst = XConf.LoadConfig("steam.xbt");
				lst["Username"] = value;
				XConf.SaveConfig("steam.xbt", lst);
			}
		}
	}
}
